using UnityEngine;

namespace DG.Tweening
{
    // [Assembly-CSharp-firstpass.dll].DG.Tweening.DOTweenModuleUtils
    public static class DOTweenModuleUtils
    {
        
        #region DG.Tweening.DOTweenModuleUtils.Physics
        // [Assembly-CSharp-firstpass.dll].DG.Tweening.DOTweenModuleUtils.Physics
        public static class Physics
        {
            // Methods
            public static void SetOrientationOnPath(DG.Tweening.Plugins.Options.PathOptions options, DG.Tweening.Tween t, UnityEngine.Quaternion newRot, UnityEngine.Transform trans)
            {
                if(options.useLocalPosition != true)
                {
                        trans.rotation = new UnityEngine.Quaternion() {x = newRot.x, y = newRot.y, z = newRot.z, w = newRot.w};
                    return;
                }
                
                t.target.rotation = new UnityEngine.Quaternion() {x = newRot.x, y = newRot.y, z = newRot.z, w = newRot.w};
            }
            public static bool HasRigidbody2D(UnityEngine.Component target)
            {
                if(mem[536890429] != 0)
                {
                        return UnityEngine.Object.op_Inequality(x:  target.GetComponent<System.Object>(), y:  0);
                }
                
                return UnityEngine.Object.op_Inequality(x:  target.GetComponent<System.Object>(), y:  0);
            }
            public static bool HasRigidbody(UnityEngine.Component target)
            {
                if(mem[536890429] != 0)
                {
                        return UnityEngine.Object.op_Inequality(x:  target.GetComponent<System.Object>(), y:  0);
                }
                
                return UnityEngine.Object.op_Inequality(x:  target.GetComponent<System.Object>(), y:  0);
            }
            public static DG.Tweening.Core.TweenerCore<UnityEngine.Vector3, DG.Tweening.Plugins.Core.PathCore.Path, DG.Tweening.Plugins.Options.PathOptions> CreateDOTweenPathTween(UnityEngine.MonoBehaviour target, bool tweenRigidbody, bool isLocal, DG.Tweening.Plugins.Core.PathCore.Path path, float duration, DG.Tweening.PathMode pathMode)
            {
                if(tweenRigidbody == false)
                {
                    goto label_1;
                }
                
                Unknown val_1 = target.GetComponent<System.Object>();
                if(val_1 == 0)
                {
                    goto label_4;
                }
                
                if(isLocal == false)
                {
                        return DG.Tweening.DOTweenModulePhysics.DOPath(target:  val_1, path:  path, duration:  duration, pathMode:  pathMode);
                }
                
                return DG.Tweening.DOTweenModulePhysics.DOLocalPath(target:  val_1, path:  path, duration:  duration, pathMode:  pathMode);
                label_1:
                label_9:
                UnityEngine.Transform val_3 = target.transform;
                if(isLocal == false)
                {
                        return DG.Tweening.ShortcutExtensions.DOPath(target:  val_3, path:  path, duration:  duration, pathMode:  pathMode);
                }
                
                return DG.Tweening.ShortcutExtensions.DOLocalPath(target:  val_3, path:  path, duration:  duration, pathMode:  pathMode);
                label_4:
                Unknown val_4 = target.GetComponent<System.Object>();
                if(val_4 == 0)
                {
                    goto label_9;
                }
                
                if(isLocal == false)
                {
                        return DG.Tweening.DOTweenModulePhysics2D.DOPath(target:  val_4, path:  path, duration:  duration, pathMode:  pathMode);
                }
                
                return DG.Tweening.DOTweenModulePhysics2D.DOLocalPath(target:  val_4, path:  path, duration:  duration, pathMode:  pathMode);
            }
        
        }
        
        #endregion
        
        // Fields
        private static bool _initialized;
        
        // Methods
        public static void Init()
        {
            if(mem[536884829] != 0)
            {
                    return;
            }
            
            mem2[0] = 1;
            System.Action<DG.Tweening.Plugins.Options.PathOptions, System.Object, UnityEngine.Quaternion, System.Object> val_1 = 536873557;
            val_1 = new System.Action<DG.Tweening.Plugins.Options.PathOptions, System.Object, UnityEngine.Quaternion, System.Object>(object:  0, method:  1610682461);
            DG.Tweening.Core.DOTweenExternalCommand.add_SetOrientationOnPath(value:  val_1);
        }
        private static void Preserver()
        {
            Unknown val_2 = System.AppDomain.CurrentDomain.GetAssemblies();
            System.Reflection.MethodInfo val_4 = System.Type.GetTypeFromHandle(handle:  new System.RuntimeTypeHandle() {value = 1073760587}).GetMethod(name:  -1610603501);
        }
    
    }

}
